/**
 * 商品/服务 类别模型
 */
'use strict';

var mongodb = require('./mongodb.js');
var Schema = mongodb.Schema;

// create a schema
var categorySchema = new Schema({
    name: {
        type: String,
        require: true
    },
    desc: String,
    pCode: Schema.Types.ObjectId
});

// 指定collection name，默认是复数
var category = mongodb.model('category', categorySchema, 'category');
exports = module.exports = category;